import { createRouter, createWebHashHistory } from 'vue-router'
import type { RouteRecordRaw } from 'vue-router'

// 各页面骨架组件后续会补充完善
const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Home',
    redirect: '/desktop'
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/LoginView.vue')
  },
  {
    path: '/desktop',
    name: 'Desktop',
    component: () => import('@/views/DesktopView.vue')
  },
  {
    path: '/plugin',
    name: 'Plugin',
    component: () => import('@/views/PluginView.vue')
  },
  {
    path: '/settings',
    name: 'Settings',
    component: () => import('@/views/SettingsView.vue')
  },
  {
    path: '/data',
    name: 'Data',
    component: () => import('@/views/DataView.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
